#include <faker/engine/ui/Layout.h>
#include <faker/engine/ui/StateBuffer.h>

void Faker::Engine::UI::Layout::Instance()
{
    ImGui::DockSpaceOverViewport(ImGui::GetMainViewport());

    
    m_EntityEditor.Instance();
    m_SceneTreeNodeEditor.Instance();
    m_FileSystemEditor.Instance();
    m_SceneLayer.Instance();
    m_SceneZmoEditor.Instance();

}

void Faker::Engine::UI::Layout::HandleSignal()
{
    auto& m_Signal =Faker::Engine::UI::StateBuffer::signal;
    
    m_EntityEditor.HandleSignal();
    m_SceneTreeNodeEditor.HandleSignal();
    m_FileSystemEditor.HandleSignal();
    m_SceneLayer.HandleSignal();
    m_SceneZmoEditor.HandleSignal();
}

void Faker::Engine::UI::Layout::SetSceneTexture(const Gut::Texture2D &sceneTexture)
{
    m_SceneLayer.SetSceneTexture(sceneTexture);
}

void Faker::Engine::UI::Layout::SetSceneRef(Faker::Scene* sceneRef)
{
    m_SceneTreeNodeEditor.m_Scene_ref = sceneRef;
    
}